package com.roadjava.tutor.service;

import com.roadjava.tutor.bean.dto.UserDTO;
import com.roadjava.tutor.bean.entity.Member;
import com.roadjava.tutor.bean.res.ResultDTO;
import com.roadjava.tutor.bean.vo.UserVO;

import java.util.List;

/**
 * 会员业务类
 * @author zhaodaowen
 * @see <a href="http://www.roadjava.com">乐之者java</a>
 */
public interface MemberService {
    /**
     * 注册
     * @param userDTO
     * @return
     */
    ResultDTO<String> register(UserDTO userDTO);
    /**
     * 登录
     * @param userDTO
     * @return
     */
    ResultDTO<UserVO> login(UserDTO userDTO);

    /**
     * 根据id查询一个会员
     * @param id 会员id
     * @return
     */
    ResultDTO<Member> selectOneById(Long id);
    /**
     * 根据id更新会员
     */
    ResultDTO<String> trueUpdate(UserDTO userDTO);

    /**
     * 查询会员表格
     */
    ResultDTO<List<Member>> loadMemberTable(UserDTO dto);
}
